package com.lagou.mall.esflow.server.consumer;


import com.lagou.mall.esflow.server.handler.AbstractTopicConsumerHandler;
import java.util.Arrays;
import java.util.Collections;
import java.util.concurrent.ThreadPoolExecutor;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.apache.kafka.common.protocol.types.Schema;
import org.springframework.kafka.core.KafkaTemplate;

/**
 * 抽象索引消费接口
 */
public abstract class IIndexConsumer {


    private AbstractTopicConsumerHandler topicConsumerHandler;

    private ThreadPoolExecutor threadPoolExecutor;

    private KafkaConsumer kafkaConsumer;





    public abstract void sleep();



    public void setTopicConsumerHandler(AbstractTopicConsumerHandler topicConsumerHandler) {
        this.topicConsumerHandler = topicConsumerHandler;
    }

    public void setThreadPoolExecutor(ThreadPoolExecutor threadPoolExecutor) {
        this.threadPoolExecutor = threadPoolExecutor;
    }


    public KafkaConsumer getKafkaConsumer() {
        return kafkaConsumer;
    }

    public void setKafkaConsumer(KafkaConsumer kafkaConsumer) {
        this.kafkaConsumer = kafkaConsumer;
    }

    public AbstractTopicConsumerHandler getTopicConsumerHandler() {
        return topicConsumerHandler;
    }

    public ThreadPoolExecutor getThreadPoolExecutor() {
        return threadPoolExecutor;
    }
}
